jsx3.Class.defineClass(
	"ux.core.demo.IFrame", jsx3.gui.Block, [jsx3.xml.Cacheable, jsx3.xml.CDF], function(IFrame, IFrame_prototype) {
	
	IFrame_prototype.get = function(objName) {
		return this.getDescendantOfName(objName);
	};
	
	IFrame_prototype.initialize = function() {
		jsx3.log('IFrame initialize ...');
		this.get('btnOld').onClick = jsx3.makeCallback(this.reload, this);
		this.get('btnNew').onClick = jsx3.makeCallback(this.reload, this);
	};

	IFrame_prototype.reload = function(iframeType) {
		jsx3.log('iframeType : ' + iframeType);
		if (iframeType == 1) { //Template Language IFrame
			var frame = this.get('newIFrame');
			frame.setSrc(frame.getSrc(), true);
			jsx3.log('I am the Template-Language Base IFrame.');
		} else { //Base IFrame
			var frame = this.get("oldIFrame");
			frame.setSrc(frame.getSrc(), true);
			jsx3.log('I am the old IFrame.');
		}
	};
});